feat(agent-skills): manage app agent skills from the CLI - #575
Merged
Conversation
Export SKILL_NAME_REGEX, AgentSkillApiResponseSchema, ListAgentSkillsResponseSchema, and SyncAgentSkillsResultSchema (and their inferred types) so they can be used by Task 2 and other modules. These are part of the public API of the agent-skill module. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds selected_skill_names as a typed, defaulted array on AgentConfigSchema. selected_workspace_skill_ids remains untyped passthrough via looseObject. Updates agents.spec.ts fixtures/assertions to account for the new default field.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Adds `base44 agent-skills pull|push`, registers them in program.ts, and adds TestAPIServer mocks for the agent-skills reconcile endpoints. Also fixes deploy/env-token-auth tests that were missing a GET agent-skills mock now that deploy always reconciles agent skills (pushAgentSkills fetches remote unconditionally, even for an empty local set).
…mote skills pushAgentSkills now short-circuits on an empty list (mirrors pushAgents), so 'base44 deploy' from a project with no local skills no longer reconciles against remote and deletes them. Reverts the deploy-spec GET mocks that had masked the missing guard, and adds a unit test asserting the empty push makes no HTTP calls.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.6-pr.575.57983f5Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.6-pr.575.57983f5"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.6-pr.575.57983f5"
}
}
Preview published to npm registry — try new features instantly! |
yardend-wix
force-pushed
the
feat/agent-skills-cli
branch
from
July 26, 2026 07:05
1cff89f to
3594d8c
Compare
…d conventions - add 'successfully' to task success messages (matches agents/connectors/entities) - 'Manage project agent skills' (matches the 'project' wording used by siblings) - add '(replaces all remote/local agent skills)' clauses to push/pull descriptions - drop the dead AgentSkillApiResponse type alias
# Conflicts: # docs/resources.md
#573) Main added confirmPush + -y/--yes to the resource push commands; mirror it on agent-skills push so it prompts (and requires --yes non-interactively) like agents.
yardend-wix
force-pushed
the
feat/agent-skills-cli
branch
from
July 28, 2026 10:19
4a86148 to
2e3a871
Compare
- add agent-skills_pull.spec.ts (mirrors agents_pull: written/skip/update/delete/error) - add the non-interactive '--yes required' push test (parity with agents/entities/connectors) - make the push update path real (was a dead mock) and assert Created/Updated/Deleted - move readProjectConfig skills case into project.spec.ts; add 'throws on invalid agent skill file' + invalid-agent-skill fixture - add core schema-validation negatives (bad name, empty body) to config spec - add missing .app.jsonc to the with-agent-skills fixture (testing rule #3)
netanelgilad
previously approved these changes
Jul 30, 2026
…rc-mock tests - parse skill frontmatter with the existing front-matter dep (+ yaml for serialization) instead of a hand-rolled regex; round-trip verified live incl. colon/apostrophe descriptions - remove the two src-mocking unit specs (agent-skills_deploy, agent-skills_api); the empty-push guard is now covered by the integration push spec (no mocks registered -> any request would 404), reconcile is covered end-to-end there - assert the error message in the invalid-skill project test
netanelgilad
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds agent skills as a first-class CLI resource. Agent skills are app-scoped instruction snippets stored as one markdown file per skill under
base44/agent-skills/(filename = skill name, front-matterdescription= summary, body = instructions), which agents reference by name throughselected_skill_names. The PR introducesbase44 agent-skills pull/push, wires skills into project config and the unifieddeployflow (pushed before agents so references resolve), and scaffolds an example skill in thebackend-and-clienttemplate.Related Issue
None (push confirmation follows the agents-command parity established in #573)
Type of Change
Changes Made
New
agent-skillresource (packages/cli/src/core/resources/agent-skill/)schema.ts— Zod schemas for skills (lowercase-hyphenated name, max 64 chars; description max 1024; body max 15000) plus API list/sync response schemas.config.ts— markdown file I/O:readAllAgentSkills()parses*.mdwith the existingfront-matterlib;writeAgentSkills()serializes YAML front-matter, skips unchanged files, and deletes local files missing from the remote list.api.ts—fetchAgentSkills()andpushAgentSkills(), which reconciles against the remote set (POST new, PUT changed, DELETE remote-only) and returns created/updated/deleted names. It returns early on an empty local list so a project with no skills never wipes remote skills during deploy.resource.ts— implements the standardResource<AgentSkill>interface (readAll/push).New CLI commands
base44 agent-skills pull— fetches remote skills and syncs them intoagentSkillsDir, reporting written/deleted files.base44 agent-skills push— pushes local skills with a destructive-action confirmation (-y/--yesto skip; auto-skipped when non-interactive), matching the agents commands.program.tsunder a newagent-skillscommand group.Project config & deploy
agentSkillsDirconfig key (defaults toagent-skills);agentSkillsadded toProjectResources/ProjectDataand loaded in parallel with the other resources (empty for plugin resource sets).deployAll()pushes agent skills immediately before agents;hasResourcesToDeploy()accounts for them.Agent schema
selected_skill_namesis now a typed, defaulted ([]) field onAgentConfigSchema.selected_workspace_skill_ids(org-shared workspace skills) still passes through untouched vialooseObject.Template & docs
backend-and-clienttemplate ships aweekly-report.mdexample skill, referenced fromtask_manager.jsonc.docs/resources.mdgains an "Agent skills" section and updated deploy ordering.Testing
npm test)New/updated tests:
tests/cli/agent-skills_pull.spec.ts— empty remote, outside-a-project failure, successful pull, API error, files written to disk, unchanged skills skipped, in-place update, local deletion.tests/cli/agent-skills_push.spec.ts— empty-project guard, outside-a-project failure, create, update + delete reconciliation.tests/core/agent-skills_config.spec.ts— parse, write/read round-trip, deletion, missing directory, invalid name, empty body.tests/core/project.spec.ts,tests/core/agents-schema.spec.ts,tests/core/agents.spec.ts— config loading, invalid skill file,selected_skill_namesparsing and defaults.tests/cli/testkit/TestAPIServer.ts— mocks for the agent-skills GET/POST/PUT/DELETE endpoints; newwith-agent-skillsandinvalid-agent-skillfixtures.Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
No new runtime dependencies —
front-matter,yaml, andglobbyare already bundled (front-matteris also used bycore/project/template.ts). Skills are pushed before agents during deploy so agents referencing a skill by name resolve against skills that already exist remotely. Bothpullandpushreconcile (each deletes entries missing on the other side), which is whypushprompts for confirmation and thepulldescription calls out that it replaces local files.🤖 Generated by Claude | 2026-07-30 08:31 UTC | 57983f5